package com.xaicode.template.aop.controller;

import com.xaicode.template.aop.aspect.Access;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Locker
 * @date 2021/8/3 0003 17:05
 */
@RestController
@RequestMapping("aop")
public class AopController {

    @RequestMapping("first")
    public Object first() {
        return "first";
    }

    @RequestMapping("error")
    public Object error() {
        return 1 / 0;
    }

    @RequestMapping("second")
    @Access(desc = "second")
    public Object second() {
        return "second";
    }

}
